<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style type="text/css">
        .container {
            width: 500px;
            background: green;
            margin:10px auto;
        }
        .container1 {
            height: 200px;
            background: pink;
            /* clear: both; */
        }
        .container div{
            width: 100px;
            height: 100px;
            float: left;
        }
        .box1 {
            background: red;
        }
        .box2 {
            background: orange;
        }
        .box3 {
            background: yellow;
        }
        .box4 {
            background: yellowgreen;
        }
        .box5 {
            background: turquoise;
        }
        .box6 {
            background: blue;
        }
        /* 外墙法 */
        .out-wall {
            clear: both;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box1">box1-1-1</div>
        <div class="box2">box2-2-2</div>
        <div class="box3">box3-3-3</div>
        <div class="box4">box4-4-4</div>
        <div class="box5">box5-5-5</div>
        <div class="box6">box6-6-6</div>
    </div>
    <div class="out-wall"></div>
    <div class="container1">外部盒子</div>
</body>
</html>